main(List<String> args) {
  final z = SuperMan();
  z.eating();
  z.flying();
  z.running();
}

// 用mixin +with 来混入
mixin Runner {
  void running() {
    print('run');
  }
}

mixin Flyer {
  void flying() {
    print('fly');
  }
}

class Person {
  void eating() {
    print('eat foo');
  }

  void running() {
    print('run test');
  }
}

// 优先级 自己最大->混入的优先->继承
class SuperMan extends Person with Runner, Flyer {
  @override
  void eating() {
    super.eating();
  }

// 混入之后重写可以覆盖
  // @override
  // void running() {
  //   print('重写');
  // }
}
